package com;

import com.mapper.DepartmentMapper;
import com.pojo.Department;
import com.utils.MyBatisUtils;
import org.junit.Test;

import java.util.List;

/**
 * @author YDW
 * projectName:project2202_3
 * time:2022/4/28 15:57
 * description:
 */
public class testMybatis {
    @Test
    public void queryAll(){
        DepartmentMapper mapper = MyBatisUtils.getMapper(DepartmentMapper.class);
        List<Department> departments = mapper.queryAll();
        for (Department department : departments) {
            System.out.println(department);
            System.out.println(department.getEmployee());
        }
    }
}
